package cn.tedu.spring.example;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
/*
* 1.Spring Framework创建对象，放入IoC容器中；
* 2.从IoC容器中获取对象；
* 3.调用run（）方法进行测试
* 复制包路径ctrl+shift+alt+c
* */
public class TestUser {
    public static void main(String[] args) {
        ApplicationContext context=new AnnotationConfigApplicationContext("cn.tedu.spring.example");
        //context.getBean(User.class).var+回车
        User user=context.getBean(User.class);
        user.run();
    }
}
